<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemCitiesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_cities', function (Blueprint $table) {
            $table->id()->comment('城市表');
            $table->integer('city_id')->comment('城市id');
            $table->integer('parent_id')->comment('父级id');
            $table->integer('level')->comment('省市级别');
            $table->string('area_code',30)->comment('区号');
            $table->string('name',100)->comment('名称');
            $table->string('merger_name',255)->comment('合并名称');
            $table->string('ing',50)->comment('经度');
            $table->string('lat',50)->comment('纬度');
            $table->tinyInteger('is_show')->default(1)->comment('是否显示 0=不显示 1=显示');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_cities');
    }
}
